Haskell-style Overloading is NP-hard

نویسنده

  • Dennis M. Volpano
چکیده

Extensions of the ML type system based on con strained type schemes have been proposed for lan guages with overloading Type inference in these sys tems requires solving the following satis ability prob lem Given a set of type assumptions C over nite types and a type basis A is there is a substitution S that satis es C in that A CS is derivable Un der arbitrary overloading the problem is undecidable Haskell limits overloading to a form similar to that proposed by Kaes called parametric overloading We formally characterize parametric overloading in terms of a regular tree language and prove that although de cidable satis ability is NP hard when overloading is parametric

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Haskell - style Overloading is NP - hardDennis

Extensions of the ML type system, based on constrained type schemes, have been proposed for languages with overloading. Type inference in these systems requires solving the following satissability problem. Given a set of type assumptions C over nite types and a type basis A, is there is a substitution S that satisses C in that A ` CS is derivable? Under arbitrary overloading, the problem is und...

متن کامل

Object - Oriented Style Overloading for Haskell ( Extended Abstract )

Haskell has a sophisticated mechanism for overloading identifiers with multiple definitions at distinct types. Object-oriented programming has a similar notion of overriding and overloading for methods names. Unfortunately, it is not possible to encode object-oriented overloading directly using Haskell overloading. This deficiency becomes particularly tiresome when Haskell programs wish to call...

متن کامل

Object-Oriented Style Overloading for Haskell

Haskell has a sophisticated mechanism for overloading identifiers with multiple definitions at distinct types. Objectoriented programming has a similar notion of overriding and overloading for methods names. Unfortunately, it is not possible to encode object-oriented overloading directly using Haskell overloading. This deficiency becomes particularly tiresome when Haskell programs wish to call ...

متن کامل

Introducing Kansas Lava

Kansas Lava is a domain specific language for hardware description. Though there have been a number of previous implementations of Lava, we have found the design space rich, with unexplored choices. We use a direct (Chalmers style) specification of circuits, and make significant use of Haskell overloading of standard classes, leading to concise circuit descriptions. Kansas Lava supports both si...

متن کامل

Beyond Type Classes

We discuss type classes in the context of the Chameleon language, a Haskell-style language where overloading resolution is expressed in terms of the meta-language of Constraint Handling Rules (CHRs). In a first step, we show how to encode Haskell’s single-parameter type classes into Chameleon. The encoding works by providing an approrpriate set of CHRs which mimic the Haskell conditions. We als...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1994